Fix scheduled action panic with null event payload#37459
Merged
silverwind merged 8 commits intogo-gitea:mainfrom Apr 28, 2026
Merged
Fix scheduled action panic with null event payload#37459silverwind merged 8 commits intogo-gitea:mainfrom
silverwind merged 8 commits intogo-gitea:mainfrom
Conversation
Avoid assigning to a nil map when a scheduled action event payload is JSON null. Co-Authored-By: Hermes Agent (GPT-5.5) <hermes-agent@users.noreply.github.com>
lunny
approved these changes
Apr 27, 2026
wxiaoguang
reviewed
Apr 27, 2026
Contributor
Author
|
Rechecked wxiaoguang's inline feedback against current HEAD Local verification:
Authored-by: Hermes Agent (GPT-5.5) |
Member
Yes as I did it 👀 |
Use a single `var event map[string]any` declaration instead of initialising twice, and add a comment explaining where the empty/null eventPayload values come from (addresses wxiaoguang's review note). Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
silverwind
approved these changes
Apr 28, 2026
Member
|
Test failure is unrelated |
wxiaoguang
pushed a commit
that referenced
this pull request
Apr 28, 2026
Backport #37459 by cyphercodes This fixes the scheduled action panic when an event payload is JSON `null` by initializing the payload map before adding `schedule`. It also adds regression coverage for the null-payload case. Fixes #37447. Co-authored-by: Rayan Salhab <r.salhab@aiyexpertsolutions.com> Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com> Co-authored-by: Hermes Agent (GPT-5.5) <hermes-agent@users.noreply.github.com> Co-authored-by: Nicolas <bircni@icloud.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 29, 2026
* main: Add DEFAULT_TITLE_SOURCE setting for pull request title default behavior (go-gitea#37465) Fix compare dropdown for branches without common history (go-gitea#37470) FIX: URL sanitization to handle schemeless credentials (go-gitea#37440) Refactor pull request view (4) (go-gitea#37451) Fix scheduled action panic with null event payload (go-gitea#37459) Fix attachment Content-Security-Policy (go-gitea#37455) [skip ci] Updated translations via Crowdin Rename CurrentRefPath to CurrentRefSubURL (go-gitea#37453) Clean up org pages layout (go-gitea#37445) Fix script error alert (go-gitea#37458) Fix inconsistent disabled styling on logged-out repo header buttons (go-gitea#37406) Add API endpoint to reply to pull request review comments (go-gitea#36683) Add CurrentURL template variable back (go-gitea#37444)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the scheduled action panic when an event payload is JSON
nullby initializing the payload map before addingschedule. It also adds regression coverage for the null-payload case.Fixes #37447.
Testing:
go test -tags 'sqlite sqlite_unlock_notify' ./services/actions -run '^TestWithScheduleInEventPayload$' -count=1GITEA_TEST_CONF=custom/conf/app-test-root.inifile that only setI_AM_BEING_UNSAFE_RUNNING_AS_ROOT = true.Authorship: cyphercodes; AI assistance disclosed: Hermes Agent (GPT-5.5).